﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" 
    CodeBehind="frmNotaInformativa.aspx.cs" Inherits="ddcCajamarca.Web.Post.frmNotaInformativa" validateRequest="false"%>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    
    <link rel="stylesheet" href="/Scripts/plugin/Tiny/tinyeditor.css">
    <script src="/Scripts/plugin/Tiny/tiny.editor.packed.js"></script>

    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title">Panel title</h3>
        </div>
        <div class="panel-body">
            <div class="container">
                <div class="row">
                    <h3>Nota Informativa</h3>
                </div>
                <div class="row">
                    <label>Titulo</label>
                    <asp:TextBox runat="server" CssClass="form-control" ID="txtTitulo" />
                </div>
                <div class="row">
                    <label>Subtitulo</label>
                    <asp:TextBox runat="server" CssClass="form-control" ID="txtSubtitulo" />
                </div>
                 <div class="row">
                    <label>Imagen*</label>
                    <asp:FileUpload ID="fuImagen" CssClass="form-control" runat="server" />
                </div>
                <div class="row">
                    <div class="col-lg-8" style="padding-left:0px;">
                        <label>Texto*</label>
                        <asp:TextBox runat="server" CssClass="form-control" ID="txtTexto" />
                    </div>
                    <div class="col-lg-4">

                        <div class="panel panel-info" style="margin-top:20px;">
                            <div class="panel-heading">Opciones</div>
                            <div class="panel-body">
                                 <input type="button" name="name" value="Validar" class="btn btn-info" onclick="mandarData()" />
                                 <asp:Button Text="Guardar" CssClass="btn btn-success" runat="server" ID="Button1"
                                OnClick="btnGuardar_Click" />
                                <asp:Button Text="Cancelar" CssClass="btn btn-danger" runat="server" ID="btnCancelar"
                                OnClick="btnGuardar_Click" />
                            </div>
                        </div>                       
                    </div>
                    
                </div>
             
            </div>
        </div>
    </div>

    
   

    


    <script>
        var editor = new TINY.editor.edit('editor', {
            id: 'MainContent_txtTexto',
            width: 760,
            height: 175,
            cssclass: 'tinyeditor',
            controlclass: 'tinyeditor-control',
            rowclass: 'tinyeditor-header',
            dividerclass: 'tinyeditor-divider',
            controls: ['bold', 'italic', 'underline', 'strikethrough', '|', 'subscript', 'superscript', '|',
                'orderedlist', 'unorderedlist', '|', 'outdent', 'indent', '|', 'leftalign',
                'centeralign', 'rightalign', 'blockjustify', '|', 'unformat', '|', 'undo', 'redo', 'n',
                'font', 'size', 'style', '|', 'image', 'hr', 'link', 'unlink', '|', 'print'],
            footer: true,
            fonts: ['Verdana', 'Arial', 'Georgia', 'Trebuchet MS'],
            xhtml: true,
            cssfile: 'custom.css',
            bodyid: 'editor',
            footerclass: 'tinyeditor-footer',
            toggle: { text: 'source', activetext: 'wysiwyg', cssclass: 'toggle' },
            resize: { cssclass: 'resize' }
        });
</script>

    <script>
        function mandarData() {

            editor.toggle(0, this); editor.toggle(0, this);
            var cont = $('#MainContent_txtTexto').val();
            //$('#MainContent_fvNotaInformativa_txtTexto2').val(cont)
            alert($('#MainContent_txtTexto').val()); $('#editor').val();
            $('#MainContent_Button1').attr("disabled", false);
           
        }

        $(function () {
            $('#MainContent_Button1').attr("disabled", true);
        });


    </script>
</asp:Content>
